package com.lipi.mall.authserver.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * springMVC自动映射配置
 */
@Configuration
public class WebMappingConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //将路径映射到视图,controller可以避免编写空方法
//        registry.addViewController("/login.html").setViewName("login");
//        registry.addViewController("/reg.html").setViewName("reg");
    }
}
